package StudyCode.summary.Basic;

import java.util.Scanner;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class VolumeSphere {
	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);

		System.out.print("输入球体半径并回车: ");
		double radius = input.nextDouble();

		System.out.printf("球体积: %f%n", sphereVolume(radius));
	}

	public static double sphereVolume(double radius) {
		return (4.0 / 3.0) * Math.PI * Math.pow(radius, 3);
	}
}
